|
In computer science, loop fusion (or loop jamming) is a compiler optimization and loop transformation which replaces multiple loops with a single one. It is possible when two loops iterate over the same range and do not reference each other's data. Loop fusion does not always improve run-time speed. On some architectures, two loops may actually perform better than one loop because, for example, there is increased data locality within each loop. In these cases, a single loop may be transformed into two, which is called loop fission. == Example in C == int i, a(), b(); for (i = 0; i < 100; i++) a() = 1; for (i = 0; i < 100; i++) b() = 2; is equivalent to: int i, a(), b(); for (i = 0; i < 100; i++) 抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)』 ■ウィキペディアで「Loop fusion」の詳細全文を読む スポンサード リンク
|